home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / misc / montor.zip / MONSRC.ZIP / MONTOR.BAS < prev    next >
BASIC Source File  |  1993-09-16  |  2KB  |  61 lines

  1. Option Explicit
  2. Global Const NumGauges = 8  ' maximum number of gauges
  3. Global ActualGauges%        ' depends on number of fixed drives
  4. Global WnTx$                ' set by Timer, displayed in Form3
  5. Global WarnHelp%            ' set by Timer, used by Form3
  6.  
  7. ' Declare Windows API function to get drive type
  8. Declare Function GetDriveType% Lib "Kernel" (ByVal nDrive%)
  9. Global Const DRIVE_INVALID = 0
  10. Global Const DRIVE_REMOVABLE = 2
  11. Global Const DRIVE_FIXED = 3
  12. Global Const DRIVE_REMOTE = 4
  13.  
  14. ' Define data type required by MemManInfo function
  15. Type tagMemManInfo
  16.   Size As Long
  17.   LargestFreeBlock As Long
  18.   MaxPagesAvailable As Long
  19.   MaxPagesLockable As Long
  20.   TotalLinearSpace As Long
  21.   TotalUnlockedPages As Long
  22.   FreePages As Long
  23.   TotalPages As Long
  24.   FreeLinearSpace As Long
  25.   SwapFilePages As Long
  26.   PageSize As Integer
  27. End Type
  28. Global Const MMIsize = 42
  29. ' Declare Windows API functions for use by memory monitor
  30. Declare Function MemManInfo% Lib "TOOLHELP.DLL" (mmi As tagMemManInfo)
  31. Declare Function GetFreeSpace& Lib "KERNEL" (ByVal wFlags%)
  32.  
  33. ' Define data type required by SystemHeapInfo function
  34. Type TagSysHeapInfo
  35.   Size As Long
  36.   UserFreePercent As Integer
  37.   GDIFreePercent As Integer
  38.   UserSegment As Integer
  39.   GDISegment As Integer
  40. End Type
  41. Global Const SHIsize = 12
  42. ' Declare Windows API function for use by system resource monitor
  43. Declare Function SystemHeapInfo% Lib "TOOLHELP.DLL" (shii As TagSysHeapInfo)
  44.  
  45. ' Declare Windows API functions for INI file management
  46. Declare Function GetPrivateProfileInt% Lib "Kernel" (ByVal lpApplicationName$, ByVal lpKeyName$, ByVal nDefault%, ByVal lpFileName$)
  47. Declare Function WritePrivateProfileString% Lib "Kernel" (ByVal lpApplicationName$, ByVal lpKeyName$, ByVal lpString$, ByVal lpFileName$)
  48.  
  49. ' Declare Windows API functions for using WinHelp
  50. Declare Function WinHelpByNum% Lib "User" Alias "WinHelp" (ByVal hWnd%, ByVal lpHelpFile$, ByVal wCommand%, ByVal dwData&)
  51. Declare Function WinHelp% Lib "User" (ByVal hWnd%, ByVal lpHelpFile$, ByVal wCommand%, ByVal dwData$)
  52.  
  53. ' Declare Windows API function for sound events
  54. Declare Sub MessageBeep Lib "User" (ByVal wType%)
  55.  
  56. ' Declare disk space functions found in external DLL
  57. Declare Function GetDiskSize& Lib "DISKDLL.DLL" (ByVal Drive%)
  58. Declare Function GetDiskFree& Lib "DISKDLL.DLL" (ByVal Drive%)
  59.  
  60.  
  61.